<template>
  <div>
    <van-row>
      <van-col span="24">
        <van-cell-group class="cell-group" title="就医指南">
          <van-cell
            class="cell"
            v-for="(item, index) in dataList"
            :title="item.title"
            size="large"
            is-link
            :to="{ path: '/wechat/guideinfo', query: { id: item.id } }"
            :key="index"
          />
        </van-cell-group>
      </van-col>
    </van-row>
  </div>
</template>

<script>
export default {
  name: "guidelist",
  data() {
    return {
      url: "/app/wechat/guide/",
      dataList: [],
    };
  },
  mounted() {
    this.getList();
  },

  methods: {
    //获取文章
    getList() {
      this.axios.post(this.url + "readApi/mid/2.html").then(({ data }) => {
        console.log(data);
        if (data.error === 0) {
          this.dataList = data.info;
        }
      });
    },
  },
};
</script>

<style scoped>
.cell-group {
}
.cell {
  /*margin-top: 1em;*/
}
</style>